<?php
/**
 *
 *
 */
namespace Yz\modules\Generic;

class Controller_Entry
    extends \Yz_Controller_Templated
    implements \Yz_Controller_Interface
{


    /**
     *
     */
    protected function doGET()
    {
        debug();
        $id = $this->fetchArgument(0);
        $model = $this->module->selectModel("Default");
        $item = $model->fetchItemById($id);

        $template = $this->selectTemplate();
        $template->item = $item;
        $template->prevItem = $model->fetchPreviousItem($item);
        $template->nextItem = $model->fetchNextItem($item);

        $this->outputTemplate($template);
        return $this;
    }


}
